package demo;

import java.io.File;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;

public class HelloWorld {
    public static void main(String[] args) throws Exception {
        FileOutputStream fos = new FileOutputStream("fos.dat");
       String line = "一袋米要抗几楼！";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = "分支上写的内容！";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = "主线上新添加了一句写入内容";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line  = "分支上又添加了一句写入操作！！！！";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        fos.close();
    }
}